var oHeader = document.querySelector(".header-search");
var oLogoBox = document.querySelector(".logoBox");

window.addEventListener("scroll", () => {
    // console.log(window.pageYOffset); // 浏览器的左上角Y到顶部的位置
    let noHeight = Utils.getScroll().top; // 不可见区域高度
    // console.log(noHeight);
    // console.log(oHeader.clientHeight); //自身的高度

    if (noHeight > oHeader.clientHeight) {
        oHeader.style.position = 'fixed';
        oHeader.style.width = '818px';
        oHeader.style.height = '40px';
        oHeader.style.backgroundColor = "#fff";
        oHeader.style.boxShadow = "0px 0px 5px 0px rgb(109, 107, 107)";

        oHeader.style.top = '0px';
        oLogoBox.style.marginTop = "46px";
    } else {
        oHeader.style.position = 'static';
        oLogoBox.style.marginTop = "6px";
        oHeader.style.boxShadow = 'none';
    }
})